package com.ybbase.framework.service.flow.impl;

import com.ybbase.framework.model.po.flow.NodeRecord;
import com.ybbase.framework.mapper.flow.NodeRecordMapper;
import com.ybbase.framework.service.flow.NodeRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 流程节点记录 服务实现类
 * </p>
 *
 * @author cg
 * @since 2019-12-04
 */
@Service
public class NodeRecordServiceImpl extends ServiceImpl<NodeRecordMapper, NodeRecord> implements NodeRecordService {
    @Autowired
    private NodeRecordMapper nodeRecordMapper;

    /**
     * 根据业务id,流程code查找审批记录
     *
     * @param businessId 业务id
     * @param flowCode   流程code
     * @return List<ActivitiRecord> 审批记录
     * @throws Exception 查询异常
     * @author xuwenwu
     * @date 2019-11-11 16:37
     * @since 4.0
     */
    @Override
    public List<NodeRecord> selectNodeRecordByBusinessIdAndFlowCodeList(Long businessId, String flowCode) {
        return nodeRecordMapper.selectNodeRecordByBusinessIdAndFlowCodeList(businessId, flowCode);
    }

    @Override
    public List<NodeRecord> getFlowData(Integer business_id) {
        return nodeRecordMapper.getFlowData(business_id);
    }

    @Override
    public List<NodeRecord> getFlowDataCash(Integer business_id) {
        return nodeRecordMapper.getFlowDataCash(business_id);
    }
}
